package app.services.impl;

import app.models.Observacao;
import app.repositories.ObservacaoRepository;
import app.repositories.Repository;
import app.services.ObservacaoService;
import br.com.caelum.vraptor.ioc.Component;

@Component
public class ObservacaoServiceImpl extends GenericServiceImpl<Observacao, Long> implements ObservacaoService {

	private final ObservacaoRepository repository;
	
	@SuppressWarnings("unchecked")
	public ObservacaoServiceImpl(ObservacaoRepository repository) {
		this.repository = repository;
		super.setGenericRepository((Repository<Observacao, Long>) repository);
	}
	
	public Observacao findByUsuarioId (Integer idUsuario) {
		return repository.findByUsuarioId(idUsuario);
	}
	
}
